package com.gd.common.util;

import java.io.File;

import com.gd.server.service.ServerContext;





public class Loger {
	private static File errorLogFile;
	private static int currentErrorLogId;
	
	private static File operationLogFile;
	private static int currentOperationLogId;
	
	
	
	static{
		errorLogFile=ServerContext.getErrorLogFile();
		operationLogFile=ServerContext.getOperationLogFile();
		currentErrorLogId=0;
		currentOperationLogId=0;
	}
	
	
	public static int errorLog(Exception e){
		e.printStackTrace();
		currentErrorLogId++;
		return currentErrorLogId;
	}
	
	public static int errorLog(String message){
		currentErrorLogId++;
		return currentErrorLogId;
	}

	public static int operationLog(Exception e){
		currentOperationLogId++;
		return currentOperationLogId;
	}
	
	public static int operationLog(String message){
		currentOperationLogId++;
		return currentOperationLogId;
	}
}
